const routes = [
  {
    path: "/login",
    name: "Login",
    component: () => import("../../views/Login/Login.vue"),
    meta: {
      noHead: true,
    },
  },
  {
    path: "/project",
    name: "ProjectsBox",
    children: [
      {
        path: "",
        name: "Projects",
        component: () => import("../../views/Project/List"),
      },
      {
        path: "detail/:id?/:status?",
        name: "ProjectDetail",
        component: () => import("../../views/Project/Project.vue"),
        children: [
          {
            path: "basicinfo",
            name: "ProjectBasicInfo",
            component: () => import("../../views/Project/BasicInfo.vue"),
          },
          {
            path: "indicator",
            name: "ProjectIndicator",
            component: () =>
              import("../../views/Project/Indicator/Indicator.vue"),
          },
          {
            path: "fill",
            name: "ProjectFill",
            component: () => import("../../views/Project/Fill/Fill.vue"),
          },
          {
            path: "fillDetail/:indicatorId/:onlyread?",
            name: "ProjectFillDetail",
            component: () => import("../../views/Project/Fill/FillDetail.vue"),
          },
          {
            path: "approval",
            name: "ProjectApproval",
            component: () => import("../../views/Project/Approval.vue"),
          },
          {
            path: "credentials",
            name: "ProjectCredentials",
            component: () => import("../../views/Project/Credentials.vue"),
          },
        ],
      },
    ],
  },
  {
    path: "/approval",
    name: "ApprovalProjectsBox",
    children: [
      {
        path: "",
        name: "ApprovalProjects",
        component: () => import("../../views/Project/ApprovalList"),
      },
      {
        path: "detail/:id?/:status?",
        name: "ApprovalProjectDetail",
        component: () => import("../../views/Project/Project.vue"),
        children: [
          {
            path: "basicinfo",
            name: "ApprovalProjectBasicInfo",
            component: () => import("../../views/Project/BasicInfo.vue"),
          },
          {
            path: "fill",
            name: "ApprovalProjectFill",
            component: () => import("../../views/Project/Fill/Fill.vue"),
          },
          {
            path: "fillDetail/:indicatorId/:onlyread?",
            name: "ApprovalProjectFillDetail",
            component: () => import("../../views/Project/Fill/FillDetail.vue"),
          },
        ],
      },
    ],
  },
  {
    path: "/backend",
    name: "BackendBox",
    component: () => import("../../views/Backend/Backend.vue"),
    children: [
      {
        name: "Backend",
        path: "",
        redirect: "/backend/user",
      },
      {
        path: "user/:tabStatus?",
        name: "BackendUsers",
        component: () => import("../../views/Backend/Users/Users.vue"),
      },
      {
        path: "project/:tabStatus?",
        name: "BackendProjectsBox",
        children: [
          {
            path: "",
            name: "BackendProjects",
            component: () =>
              import("../../views/Backend/Projects/Projects.vue"),
          },
          {
            path: "detail/:id?/:status?",
            name: "BackendProjectDetail",
            component: () => import("../../views/Project/Project.vue"),
            children: [
              {
                path: "basicinfo",
                name: "BackendProjectBasicInfo",
                component: () => import("../../views/Project/BasicInfo.vue"),
              },
              {
                path: "fill",
                name: "BackendProjectFill",
                component: () => import("../../views/Project/Fill/Fill.vue"),
              },
              {
                path: "fillDetail/:indicatorId/:onlyread?",
                name: "BackendProjectFillDetail",
                component: () =>
                  import("../../views/Project/Fill/FillDetail.vue"),
              },
              {
                path: "approval",
                name: "BackendProjectApproval",
                component: () => import("../../views/Project/Approval.vue"),
              },
              {
                path: "credentials",
                name: "BackendProjectCredentials",
                component: () => import("../../views/Project/Credentials.vue"),
              },
            ],
          },
        ],
      },
      {
        path: "indicators/:tabStatus?",
        name: "BackendIndicatorSystem",
        component: () =>
          import("../../views/Backend/Indicators/Indicators.vue"),
      },
    ],
  },
  {
    path: "/indicators",
    name: "IndicatorSystemBox",
    children: [
      {
        path: "",
        name: "IndicatorSystem",
        component: () => import("../../views/Indicators/List.vue"),
      },
      {
        path: "create",
        name: "CreateIndicatorSystem",
        component: () => import("../../views/Indicators/Create.vue"),
      },
      {
        path: "detail/:id?",
        name: "IndicatorSystemDetail",
        component: () => import("../../views/Indicators/Detail.vue"),
        children: [
          {
            path: "basicinfo",
            name: "IndicatorSystemBasicInfo",
            component: () => import("../../views/Indicators/SystemInfo.vue"),
          },
          {
            path: "indicator",
            name: "IndicatorSystemIndicator",
            component: () => import("../../views/Indicators/IndicatorList.vue"),
          },
        ],
      },
    ],
  },
  {
    path: "/chart",
    name: "Chart",
    component: () => import("../../views/Charts/Charts.vue"),
    meta: {
      noHead: true,
    },
  },
];
export { routes };
